import sys
sys.path.append('../base')
# 导入公共类
from base import Base
# 导入页面配置信息
import settings
# 继承Base类
class PageLogin(Base):
    # 点击登录链接进入登录页
    def page_click_login_link(self):
        self.base_click(settings.login_link)
    # 输入用户名
    def page_input_username(self, username):
        self.base_input(settings.username, username)
    # 输入密码
    def page_input_password(self, password):
        self.base_input(settings.password, password)
    # 点击登录按钮
    def page_click_login_button(self):
        self.base_click(settings.login_btn)
    # 组装登录
    def page_login(self, username, password):
        self.page_input_username(username)
        self.page_input_password(password)
        self.page_click_login_button()
    # 获取结果
    def page_get_result(self):
        return self.base_get_text(settings.login_result)

if __name__ == '__main__':
    p1 = PageLogin()
    p1.page_click_login_link()

    p1.base_close()